<html>
<head><meta charset="utf-8"><title>MLIR · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/MLIR.html">MLIR</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164452157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/MLIR/near/164452157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vytautas Astrauskas [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/MLIR.html#164452157">(Apr 29 2019 at 13:31)</a>:</h4>
<p>Hello, I have just been in a talk on <a href="https://github.com/tensorflow/mlir" target="_blank" title="https://github.com/tensorflow/mlir">Tensorflow MLIR</a>, which (if I understood correctly) is an approach to design an infrastructure that allows easily defining intermediate representations that can share optimisation/transformation passes. Has anyone looked into it? It feels that their ideas could be useful for designing a more optimisable MIR. (I am mostly curious about this because it seems that MLIR ideas would allow Rust consumers to define their own IRs that are better suited for their uses, for example, verification.)</p>



<a name="164452478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/MLIR/near/164452478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/MLIR.html#164452478">(Apr 29 2019 at 13:35)</a>:</h4>
<p>oh sweet</p>



<a name="164452540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/MLIR/near/164452540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/MLIR.html#164452540">(Apr 29 2019 at 13:36)</a>:</h4>
<p>That would be so cool if we could share optimizations in a language agnostic way</p>



<a name="164472064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/MLIR/near/164472064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/MLIR.html#164472064">(Apr 29 2019 at 17:39)</a>:</h4>
<p>I am very skeptical about using MLIR for Rust as-is, because it's all C++ (in pretty-hard-to-bridge ways) and I don't think anyone wants to take all the rustc code that works with MIR and rewrite it in C++.</p>
<p>The ideas behind it are interesting more broadly, but I also think that a large part of MLIR's strengths (if it indeed bears out in practice) will be the large number of potential clients amortizing the engineering cost of creating all this infrastructure. Reimplementing similar ideas from scratch in rustc, where it's only amortized over a much smaller ecosystem of tools that consume Rust, may not be economical. (Or conversely, some of the stuff MLIR is doing may be overkill for the smaller Rust-consuming ecosystem.)</p>



<a name="164474866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/MLIR/near/164474866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/MLIR.html#164474866">(Apr 29 2019 at 18:11)</a>:</h4>
<p>oh, I was hoping for some high level optimization language that we'd just need to build DSL parsers for</p>



<a name="164474930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/MLIR/near/164474930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/MLIR.html#164474930">(Apr 29 2019 at 18:12)</a>:</h4>
<p>(I did not look at MLIR at all, my comment was just to the above)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>